3.253 \(\int \frac {(e+f x) \cos (c+d x)}{a+a \sin (c+d x)} \, dx\)

Optimal. Leaf size=79 \[ -\frac {2 i f \text {Li}_2\left (i e^{i (c+d x)}\right )}{a d^2}+\frac {2 (e+f x) \log \left (1-i e^{i (c+d x)}\right )}{a d}-\frac {i (e+f x)^2}{2 a f} \]

[Out]

-1/2*I*(f*x+e)^2/a/f+2*(f*x+e)*ln(1-I*exp(I*(d*x+c)))/a/d-2*I*f*polylog(2,I*exp(I*(d*x+c)))/a/d^2

________________________________________________________________________________________

Rubi [A]  time = 0.13, antiderivative size = 79, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {4517, 2190, 2279, 2391} \[ -\frac {2 i f \text {PolyLog}\left (2,i e^{i (c+d x)}\right )}{a d^2}+\frac {2 (e+f x) \log \left (1-i e^{i (c+d x)}\right )}{a d}-\frac {i (e+f x)^2}{2 a f} \]

Antiderivative was successfully verified.

[In]

Int[((e + f*x)*Cos[c + d*x])/(a + a*Sin[c + d*x]),x]

[Out]

((-I/2)*(e + f*x)^2)/(a*f) + (2*(e + f*x)*Log[1 - I*E^(I*(c + d*x))])/(a*d) - ((2*I)*f*PolyLog[2, I*E^(I*(c +
d*x))])/(a*d^2)

Rule 2190

Int[(((F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)*((c_.) + (d_.)*(x_))^(m_.))/((a_) + (b_.)*((F_)^((g_.)*((e_.) +
 (f_.)*(x_))))^(n_.)), x_Symbol] :> Simp[((c + d*x)^m*Log[1 + (b*(F^(g*(e + f*x)))^n)/a])/(b*f*g*n*Log[F]), x]
 - Dist[(d*m)/(b*f*g*n*Log[F]), Int[(c + d*x)^(m - 1)*Log[1 + (b*(F^(g*(e + f*x)))^n)/a], x], x] /; FreeQ[{F,
a, b, c, d, e, f, g, n}, x] && IGtQ[m, 0]

Rule 2279

Int[Log[(a_) + (b_.)*((F_)^((e_.)*((c_.) + (d_.)*(x_))))^(n_.)], x_Symbol] :> Dist[1/(d*e*n*Log[F]), Subst[Int
[Log[a + b*x]/x, x], x, (F^(e*(c + d*x)))^n], x] /; FreeQ[{F, a, b, c, d, e, n}, x] && GtQ[a, 0]

Rule 2391

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> -Simp[PolyLog[2, -(c*e*x^n)]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

Rule 4517

Int[(Cos[(c_.) + (d_.)*(x_)]*((e_.) + (f_.)*(x_))^(m_.))/((a_) + (b_.)*Sin[(c_.) + (d_.)*(x_)]), x_Symbol] :>
-Simp[(I*(e + f*x)^(m + 1))/(b*f*(m + 1)), x] + Dist[2, Int[((e + f*x)^m*E^(I*(c + d*x)))/(a - I*b*E^(I*(c + d
*x))), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && IGtQ[m, 0] && EqQ[a^2 - b^2, 0]

Rubi steps

\begin {align*} \int \frac {(e+f x) \cos (c+d x)}{a+a \sin (c+d x)} \, dx &=-\frac {i (e+f x)^2}{2 a f}+2 \int \frac {e^{i (c+d x)} (e+f x)}{a-i a e^{i (c+d x)}} \, dx\\ &=-\frac {i (e+f x)^2}{2 a f}+\frac {2 (e+f x) \log \left (1-i e^{i (c+d x)}\right )}{a d}-\frac {(2 f) \int \log \left (1-i e^{i (c+d x)}\right ) \, dx}{a d}\\ &=-\frac {i (e+f x)^2}{2 a f}+\frac {2 (e+f x) \log \left (1-i e^{i (c+d x)}\right )}{a d}+\frac {(2 i f) \operatorname {Subst}\left (\int \frac {\log (1-i x)}{x} \, dx,x,e^{i (c+d x)}\right )}{a d^2}\\ &=-\frac {i (e+f x)^2}{2 a f}+\frac {2 (e+f x) \log \left (1-i e^{i (c+d x)}\right )}{a d}-\frac {2 i f \text {Li}_2\left (i e^{i (c+d x)}\right )}{a d^2}\\ \end {align*}

________________________________________________________________________________________

Mathematica [B]  time = 0.57, size = 246, normalized size = 3.11 \[ \frac {-i c^2 f+4 d e \log \left (\sin \left (\frac {1}{2} (c+d x)\right )+\cos \left (\frac {1}{2} (c+d x)\right )\right )-4 i f \text {Li}_2\left (i e^{i (c+d x)}\right )-2 i c d f x+4 c f \log \left (1-i e^{i (c+d x)}\right )+4 \pi f \log \left (1+e^{-i (c+d x)}\right )+4 d f x \log \left (1-i e^{i (c+d x)}\right )+2 \pi f \log \left (1-i e^{i (c+d x)}\right )-2 \pi f \log \left (\sin \left (\frac {1}{4} (2 c+2 d x+\pi )\right )\right )-4 \pi f \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )-4 c f \log \left (\sin \left (\frac {1}{2} (c+d x)\right )+\cos \left (\frac {1}{2} (c+d x)\right )\right )+i \pi c f-i d^2 f x^2+i \pi d f x}{2 a d^2} \]

Antiderivative was successfully verified.

[In]

Integrate[((e + f*x)*Cos[c + d*x])/(a + a*Sin[c + d*x]),x]

[Out]

((-I)*c^2*f + I*c*f*Pi - (2*I)*c*d*f*x + I*d*f*Pi*x - I*d^2*f*x^2 + 4*f*Pi*Log[1 + E^((-I)*(c + d*x))] + 4*c*f
*Log[1 - I*E^(I*(c + d*x))] + 2*f*Pi*Log[1 - I*E^(I*(c + d*x))] + 4*d*f*x*Log[1 - I*E^(I*(c + d*x))] - 4*f*Pi*
Log[Cos[(c + d*x)/2]] + 4*d*e*Log[Cos[(c + d*x)/2] + Sin[(c + d*x)/2]] - 4*c*f*Log[Cos[(c + d*x)/2] + Sin[(c +
 d*x)/2]] - 2*f*Pi*Log[Sin[(2*c + Pi + 2*d*x)/4]] - (4*I)*f*PolyLog[2, I*E^(I*(c + d*x))])/(2*a*d^2)

________________________________________________________________________________________

fricas [B]  time = 0.46, size = 156, normalized size = 1.97 \[ \frac {-i \, f {\rm Li}_2\left (i \, \cos \left (d x + c\right ) - \sin \left (d x + c\right )\right ) + i \, f {\rm Li}_2\left (-i \, \cos \left (d x + c\right ) - \sin \left (d x + c\right )\right ) + {\left (d e - c f\right )} \log \left (\cos \left (d x + c\right ) + i \, \sin \left (d x + c\right ) + i\right ) + {\left (d f x + c f\right )} \log \left (i \, \cos \left (d x + c\right ) + \sin \left (d x + c\right ) + 1\right ) + {\left (d f x + c f\right )} \log \left (-i \, \cos \left (d x + c\right ) + \sin \left (d x + c\right ) + 1\right ) + {\left (d e - c f\right )} \log \left (-\cos \left (d x + c\right ) + i \, \sin \left (d x + c\right ) + i\right )}{a d^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x+e)*cos(d*x+c)/(a+a*sin(d*x+c)),x, algorithm="fricas")

[Out]

(-I*f*dilog(I*cos(d*x + c) - sin(d*x + c)) + I*f*dilog(-I*cos(d*x + c) - sin(d*x + c)) + (d*e - c*f)*log(cos(d
*x + c) + I*sin(d*x + c) + I) + (d*f*x + c*f)*log(I*cos(d*x + c) + sin(d*x + c) + 1) + (d*f*x + c*f)*log(-I*co
s(d*x + c) + sin(d*x + c) + 1) + (d*e - c*f)*log(-cos(d*x + c) + I*sin(d*x + c) + I))/(a*d^2)

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {{\left (f x + e\right )} \cos \left (d x + c\right )}{a \sin \left (d x + c\right ) + a}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x+e)*cos(d*x+c)/(a+a*sin(d*x+c)),x, algorithm="giac")

[Out]

integrate((f*x + e)*cos(d*x + c)/(a*sin(d*x + c) + a), x)

________________________________________________________________________________________

maple [B]  time = 0.23, size = 203, normalized size = 2.57 \[ -\frac {i f \,x^{2}}{2 a}+\frac {i e x}{a}+\frac {2 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) e}{d a}-\frac {2 \ln \left ({\mathrm e}^{i \left (d x +c \right )}\right ) e}{d a}-\frac {2 i f c x}{d a}-\frac {i f \,c^{2}}{d^{2} a}+\frac {2 f \ln \left (1-i {\mathrm e}^{i \left (d x +c \right )}\right ) x}{d a}+\frac {2 f \ln \left (1-i {\mathrm e}^{i \left (d x +c \right )}\right ) c}{d^{2} a}-\frac {2 i f \polylog \left (2, i {\mathrm e}^{i \left (d x +c \right )}\right )}{a \,d^{2}}-\frac {2 f c \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{d^{2} a}+\frac {2 f c \ln \left ({\mathrm e}^{i \left (d x +c \right )}\right )}{d^{2} a} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((f*x+e)*cos(d*x+c)/(a+a*sin(d*x+c)),x)

[Out]

-1/2*I/a*f*x^2+I/a*e*x+2/d/a*ln(exp(I*(d*x+c))+I)*e-2/d/a*ln(exp(I*(d*x+c)))*e-2*I/d/a*f*c*x-I/d^2/a*f*c^2+2/d
/a*f*ln(1-I*exp(I*(d*x+c)))*x+2/d^2/a*f*ln(1-I*exp(I*(d*x+c)))*c-2*I*f*polylog(2,I*exp(I*(d*x+c)))/a/d^2-2/d^2
/a*f*c*ln(exp(I*(d*x+c))+I)+2/d^2/a*f*c*ln(exp(I*(d*x+c)))

________________________________________________________________________________________

maxima [A]  time = 0.95, size = 116, normalized size = 1.47 \[ \frac {-i \, d^{2} f x^{2} - 2 i \, d^{2} e x - 4 i \, d f x \arctan \left (\cos \left (d x + c\right ), \sin \left (d x + c\right ) + 1\right ) + 4 i \, d e \arctan \left (\sin \left (d x + c\right ) + 1, \cos \left (d x + c\right )\right ) - 4 i \, f {\rm Li}_2\left (i \, e^{\left (i \, d x + i \, c\right )}\right ) + 2 \, {\left (d f x + d e\right )} \log \left (\cos \left (d x + c\right )^{2} + \sin \left (d x + c\right )^{2} + 2 \, \sin \left (d x + c\right ) + 1\right )}{2 \, a d^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x+e)*cos(d*x+c)/(a+a*sin(d*x+c)),x, algorithm="maxima")

[Out]

1/2*(-I*d^2*f*x^2 - 2*I*d^2*e*x - 4*I*d*f*x*arctan2(cos(d*x + c), sin(d*x + c) + 1) + 4*I*d*e*arctan2(sin(d*x
+ c) + 1, cos(d*x + c)) - 4*I*f*dilog(I*e^(I*d*x + I*c)) + 2*(d*f*x + d*e)*log(cos(d*x + c)^2 + sin(d*x + c)^2
 + 2*sin(d*x + c) + 1))/(a*d^2)

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.01 \[ \int \frac {\cos \left (c+d\,x\right )\,\left (e+f\,x\right )}{a+a\,\sin \left (c+d\,x\right )} \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((cos(c + d*x)*(e + f*x))/(a + a*sin(c + d*x)),x)

[Out]

int((cos(c + d*x)*(e + f*x))/(a + a*sin(c + d*x)), x)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \frac {\int \frac {e \cos {\left (c + d x \right )}}{\sin {\left (c + d x \right )} + 1}\, dx + \int \frac {f x \cos {\left (c + d x \right )}}{\sin {\left (c + d x \right )} + 1}\, dx}{a} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x+e)*cos(d*x+c)/(a+a*sin(d*x+c)),x)

[Out]

(Integral(e*cos(c + d*x)/(sin(c + d*x) + 1), x) + Integral(f*x*cos(c + d*x)/(sin(c + d*x) + 1), x))/a

________________________________________________________________________________________